<template>
  <Descriptions bordered>
    <DescriptionsItem :span="3" label="响应错误码">{{ detailsProps.retryOnResponseStatus }}</DescriptionsItem>
    <DescriptionsItem :span="3" label="重试次数">{{ detailsProps.maxAttempts }}</DescriptionsItem>
    <DescriptionsItem :span="3" label="重试策略">{{ detailsProps.retryStrategy }}</DescriptionsItem>
    <DescriptionsItem v-if="detailsProps.retryStrategy === '固定时间间隔'" :span="3" label="重试间隔时间">
      {{ detailsProps.initialInterval }} {{ detailsProps.rtTimeUnit }}
    </DescriptionsItem>
    <DescriptionsItem v-if="detailsProps.retryStrategy === '指数时间间隔'" :span="3" label="重试基准时间">
      {{ detailsProps.waitDuration }} {{ detailsProps.rtTimeUnit }}
    </DescriptionsItem>
    <DescriptionsItem :span="3" label="乘积因子">{{ detailsProps.multiplier }}</DescriptionsItem>
  </Descriptions>
</template>
<script lang="ts" setup>
import { Descriptions, DescriptionsItem } from 'ant-design-vue';

const detailsProps = defineProps({
  retryOnResponseStatus: String,
  maxAttempts: String,
  retryStrategy: String,
  initialInterval: String,
  rtTimeUnit: String,
  multiplier: String,
  waitDuration: String,
});
</script>
